$OpenBSD: patch-source3_winbindd_wb_lookupsids_c,v 1.1 2014/02/06 04:33:25 brad Exp $

DCE-RPC fragment length field is incorrectly checked.
CVE-2013-4408

--- source3/winbindd/wb_lookupsids.c.orig	Wed May  8 04:16:26 2013
+++ source3/winbindd/wb_lookupsids.c	Tue Jan 28 02:16:43 2014
@@ -402,6 +402,9 @@ static bool wb_lookupsids_move_name(struct lsa_RefDoma
 	uint32_t src_domain_index, dst_domain_index;
 
 	src_domain_index = src_name->sid_index;
+	if (src_domain_index >= src_domains->count) {
+		return false;
+	}
 	src_domain = &src_domains->domains[src_domain_index];
 
 	if (!wb_lookupsids_find_dom_idx(
